
import axios from 'axios';

/**
 * 菜谱销售记录
 */
export class MenuSaleRecordService {
    // 分页查询列表
    static findMenuSaleRecords (queryParams) {
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/findMenuSaleRecords',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的菜谱销售记录
    static findMenuSaleRecord (menuSaleRecordId) {
        const query = {
            menuSaleRecordId
        }
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/findMenuSaleRecord',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的菜谱销售记录(包含外键名称)
    static findMenuSaleRecordForView (menuSaleRecordId) {
        const query = {
            menuSaleRecordId
        }
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/findMenuSaleRecordForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的菜谱销售记录(包含外键名称)
    static findMenuSaleRecordForEdit (menuSaleRecordId) {
        const query = {
            menuSaleRecordId
        }
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/findMenuSaleRecordForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的菜谱销售记录(只提取ID 和 Name)
    static findMenuSaleRecordsWithIdNameById (menuSaleRecordId) {
        const query = {
            menuSaleRecordId
        }
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/findMenuSaleRecordsWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询菜谱销售记录集合(只提取ID 和 Name)
    static findMenuSaleRecordsWithIdNameByName (menuSaleRecordName) {
        const query = {
            menuSaleRecordName
        }
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/findMenuSaleRecordsWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存菜谱销售记录
    static saveMenuSaleRecord (menuSaleRecord) {
        const query = {}
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/saveMenuSaleRecord',
            method: 'POST',
            params: query,
            data: menuSaleRecord
        });
    }

    //修改保存菜谱销售记录
    static updateMenuSaleRecord (menuSaleRecord) {
        const query = {}
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/updateMenuSaleRecord',
            method: 'POST',
            params: query,
            data: menuSaleRecord
        });
    }

    //根据ID查询指定的菜谱销售记录(只提取ID 和 Name)
    static deleteMenuSaleRecord (menuSaleRecordId) {
        const query = {
            menuSaleRecordId
        }
        return axios({
            url: '/restaurant/sale/MenuSaleRecord/deleteMenuSaleRecord',
            method: 'POST',
            params: query,
        });
    }
}
